package com.heima.user.feign;

import com.heima.feign.user.IUserClient;
import com.heima.model.user.pojos.ApUser;
import com.heima.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserClient implements IUserClient {
    @Autowired
    private ApUserService userService;

    /**
     * @Description:     查询用户关注信息
     * @Date 2023/6/20 16:59
     * @Author  朱传洋
     */
    @PostMapping("api/v1/user/{userId}")
    public ApUser getApUser(@PathVariable Integer userId){
        return userService.getById(userId);
    }
}